package com.lemo.controller;


import java.util.List;

import org.activiti.engine.task.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LemoController {
	
	
	@Autowired
	private ActivitiService activitiService;
	
	
	@RequestMapping("start")
	public String start(){
		activitiService.start();
		return "开始创建实例";
	}
	
	@RequestMapping("complete")
	public String complete(){
		String taskId = "5009";
		activitiService.complete(taskId );
		return "完成";
	}
	
	@RequestMapping("queryTask")
	public List<Task>  queryTask(){
		String assignee = "123";
		return activitiService.queryTask(assignee);
	}
	
}
